<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>学生信息列表</title>
</head>
<body>
    <h1>学生信息列表</h1>
    <a href="${pageContext.request.contextPath}/student/toAdd">添加学生</a>
    <table border="1">
        <tr>
            <th>ID</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${students}" var="student">
            <tr>
                <td>${student.id}</td>
                <td>${student.name}</td>
                <td>${student.age}</td>
                <td>
                    <a href="${pageContext.request.contextPath}/student/edit?id=${student.id}">编辑</a>

                </td>
            </tr>
        </c:forEach>
    </table>
</body>
</html>
